package com.cn.serverline.lineicp.workshopPlan.service.impl;

import cn.stylefeng.roses.kernel.db.api.factory.PageFactory;
import cn.stylefeng.roses.kernel.db.api.factory.PageResultFactory;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cn.serverline.lineicp.workshopPlan.entity.WeekStageDaysHistory;
import com.cn.serverline.lineicp.workshopPlan.entity.request.WeekStageDaysHistoryRequest;
import com.cn.serverline.lineicp.workshopPlan.mapper.WeekStageDaysHistoryMapper;
import com.cn.serverline.lineicp.workshopPlan.service.WeekStageDaysHistoryService;
import org.springframework.stereotype.Service;
import cn.stylefeng.roses.kernel.db.api.pojo.page.PageResult;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.*;


/**
 * 周计划下发记录
 * @author  田江余
 * @since 2024年8月6日
 */
@Service("PlanWeekStageDaysHistoryServiceImpl")
public class WeekStageDaysHistoryServiceImpl extends ServiceImpl<WeekStageDaysHistoryMapper, WeekStageDaysHistory> implements WeekStageDaysHistoryService {






    /**
     * 分页查询
     * @param planWeekStageDaysHistory 请求参数
     * @return
     */
    @Override
    public PageResult<WeekStageDaysHistory> findPage(WeekStageDaysHistory planWeekStageDaysHistory) {
        LambdaQueryWrapper<WeekStageDaysHistory> wrapper = new LambdaQueryWrapper<>();
        Page<WeekStageDaysHistory> sysRolePage = this.page(PageFactory.defaultPage(), wrapper);
        return PageResultFactory.createPageResult(sysRolePage);
    }


    /**
     * 周计划下发历史列表 时间查询
     * @param weekStageDaysHistoryRequest
     * @return
     */
    @Override
    public List<WeekStageDaysHistoryRequest> findList(WeekStageDaysHistoryRequest weekStageDaysHistoryRequest) {
        return baseMapper.distributeHistoryList(weekStageDaysHistoryRequest);
    }



}
